package com.webside.interfaces.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.webside.distinguish.mapper.SeriesDistinguishMapper;
import com.webside.enums.ValidateMsg;
import com.webside.interfaces.service.AccessService;
@Service("accessService")
public class AccessServiceImpl implements AccessService{

	@Autowired
	SeriesDistinguishMapper seriesDistinguishMapper;
	
	@Override
	public String validateSeries(Integer seriesId, String appid) {
		int count = seriesDistinguishMapper.isSeriesIndistinguish(seriesId, appid);
		if (count < 1) {
			return ValidateMsg.ERROR_SERIES.getMsg();
		}
		
		return ValidateMsg.ACCESS.getMsg();
	}
	
}
